/**
 * **common** text
 */
const enum ECommon {
    // commmon
    AMOUNT = '数量',
    NOTICE = '注意',
    WHETHER_CONFIRM__TARGET = '是否确认{_target}',
    ACCOUNT = '账户',
    SERVICE = '服务',
    PROXY = '代理',
    LIMITS = '阈值',
    FOLDER = '文件夹',
    ROOT_FOLDER = '根文件夹',
    PLUS = '+',
    IMPORT = '导入',
    NEW = '新建',
    ADD = '添加',
    DETAIL = '详情',
    UPDATE = '更新',
    RENAME = '重命名',
    SAME_NAME_EXIST = '存在重名',
    EDIT = '编辑',
    ATTR_INFO = '属性信息',
    RESET = '重置',
    CLEAR = '清空',

    // actions
    LOGIN = '登录',
    LOGOUT = '退出登录',

    ENABLE = '启用',
    DISABLE = '停用',
    LAUNCH = '上架',
    UNLAUNCH = '下架',
    OPEN = '开启',
    CLOSE = '关闭',

    TABLE_FIRST_PAGE = '查看最新数据',
    TABLE_NEXT = '下一页',

    // default
    ID = 'ID',
    TYPE = '类型',
    STATUS = '状态',
    CREATED_AT = '创建时间',
    UPDATED_AT = '更新时间',
    UPDATED_BY = '更新人',
    ACTION = '操作',
    DESCRIPTION = '描述',
    DESCRIPTION_PICTURES = '描述图片',
    PARENT_ID = '属于',
    PATH = '路径',

    STATUS_IN_USE = '使用中',
    STATUS_DELETED = '已删除',

    TARGET_MANAGE = '{_target}管理',
    TARGET_STORAGE = '{_target}库',
    TARGET_MAINTAIN = '{_target}维护',

    COMPONENT = '组件',
    MAIN_DATA = '主数据',
    AUTHORITY = '权限',
    SYSTEM = '系统',

    PROJECT = '项目',
    PROJECT_TEMPLATE = '项目模板',
    FUNCTION_BLOCK = '功能块',
    FUNCTION_TEMPLATE = '功能块模板',
    E_PLAN_FILE = 'EPLAN文件',
    CATEGORY = '类目',
    PARTS = '部件',
    FUNCTION_CELL = '功能单元',
    COMMON_PHYSICAL_QUANTITY = '基本物理量',
    COMMON_ENUM_DICT = '通用枚举定义',
    ENUM_DICT = '枚举定义',
    PROXY_PROGRAM = '代理程序',

    USER = '用户',
    ROLE = '角色',
    DEPARTMENT = '部门',
    MENU = '菜单',
    STATION = '岗位',
    TENANT = '租户',

    VALUE = '值',
    VARIABLE = '变量',
    INPUT_VARIABLE = '输入变量',
    MIDDLE_VARIABLE = '中间变量',
    BELONG_TO_THE_NODE = '归属节点',
    EN_VARIABLE = 'En',

    NUMBER = '数字',
    BOOLEAN = '布尔值',
    ENUM = '枚举',
    ENUM_ARRAY = '枚举集合',
    CHARACTER = '符号',
    FREQUENT_UNIT = '常用单位',
    NUMERATOR = '分子',
    DENOMINATOR = '分母',
    PHYSICAL_QUANTITY = '物理量',
    OBJECT = '对象',
    BASIC_UNIT = '基础单位',
    UNIT = '单位',
    DEFAULT_VALUE = `默认值`,
    RANGE = '值域',

    BRAND = '品牌',
    SERIES = '系列',
}

/**
 * **normal** text
 */
const normal = {
    PLUS: ECommon.PLUS,
    IMPORT: ECommon.IMPORT,
    IMPORT__TARGET: `${ECommon.IMPORT}{_target}`,
    NEW__TARGET: `${ECommon.NEW}{_target}`,
    DETAIL__TARGET: `${ECommon.DETAIL}{_target}`,
    EDIT__TARGET: `${ECommon.EDIT}{_target}`,
    UPDATE__TARGET: `${ECommon.UPDATE}{_target}`,
    RENAME: ECommon.RENAME,
    RENAME__TARGET: `${ECommon.RENAME}{_target}`,
    SAME_NAME_EXIST: ECommon.SAME_NAME_EXIST,
    SAME_NAME_EXIST__TARGET: `${ECommon.SAME_NAME_EXIST}{_target}`,
    ATTR_INFO: ECommon.ATTR_INFO,
    ATTR_INFO__TARGET: `{_target}${ECommon.ATTR_INFO}`,

    NOTICE: ECommon.NOTICE,
    WHETHER_CONFIRM__TARGET: ECommon.WHETHER_CONFIRM__TARGET,

    LOGIN: ECommon.LOGIN,
    LOGOUT: ECommon.LOGOUT,

    MAIN_PAGE: '主页',
    ADMIN: '管理页',
    GUIDANCE: '导航',
    SEARCH: '搜索',
    PROXY_MANAGEMENT: '代理程序',
    DATE: '日期',
    CREATED_AT: ECommon.CREATED_AT,
    UPDATED_AT: ECommon.UPDATED_AT,
    UPDATED_BY: ECommon.UPDATED_BY,
    CREATED_BY: '创建者',
    NAME: '名称',
    CODE: '编码',
    DESCRIPTION: ECommon.DESCRIPTION,
    DESCRIPTION_PICTURES: ECommon.DESCRIPTION_PICTURES,
    STATUS: ECommon.STATUS,
    TYPE: ECommon.TYPE,
    _TARGET_TYPE: `{_target}${ECommon.TYPE}`,
    _TARGET_VALUE_TYPE: `{_target}${ECommon.VALUE}${ECommon.TYPE}`,
    LANGUAGE: '语言',
    NAME_WITH_UNIT: '{_name}({_unit})',
    YES: '是',
    NO: '否',
    BASIC_INFO: '基本信息',
    FOLDER: ECommon.FOLDER,
    ROOT_FOLDER: ECommon.ROOT_FOLDER,
    WEATHER_DELETE_TARGET_TIP: `是否删除{_target}?{_target}删除不可恢复！`,
    __TARGET_CAN_NOT_MULTI: `{_target}不可重复！`,

    __NAME: '{_name}名',
    __TYPE: '{_name}类型',
    __CATEGORY: '{_name}分类',
    _NAME_VALUE: `{_name}${ECommon.VALUE}`,
    DATA: `数据`,
    NAME_TIP: '标题过长会自动收缩',
    POSITION: '位置',
    ACTION: ECommon.ACTION,
    _TARGET_DETAIL: `{_target}${ECommon.DETAIL}`,
    SELECT__TARGET: '选择{_target}',
    CREATE__TARGET: '创建{_target}',
    DELETE__TARGET: '删除{_target}',
    BATCH__TARGET: '批量{_target}',
    ADJUST__TARGET: '调整{_target}',
    PRIVATE__TARGET: '私有{_target}',
    EFFECTED__TARGET: '受影响的{_target}',
    VIEW__TARGET: '查看{_target}',
    CANCEL__TARGET: '取消{_target}',
    RESET: ECommon.RESET,
    RESET_ALL: `全部${ECommon.RESET}`,
    RESET__TARGET: `${ECommon.RESET}{_target}`,
    CLEAR: ECommon.CLEAR,
    CLEAR_ALL: `全部${ECommon.CLEAR}`,
    INVOKE__TARGET: '引用{_target}',
    CREATE_FROM__TARGET: '从{_target}新建',

    USER_NAME: '用户名',
    PASSWORD: '密码',
    KEY_PAIR: '密钥对',
    ADVANCED_SETTING: '高级设置',

    UNDO: '撤销',
    REDO: '重做',
    MODIFY: '编辑',
    VIEW: '查看',
    VIEW_BELOW: '向下查看',
    VIEW_ENUM: '查看枚举',
    CUT: '剪切',
    COPY: '复制',
    PASTE: '粘贴',
    DELETE: '删除',
    MORE: '更多',
    ADD: ECommon.ADD,
    ADD__TARGET: `${ECommon.ADD}{_target}`,
    FULLSCREEN: '全屏',
    ALL: '全部',
    UPLOAD__TARGET: '上传{_target}',

    EXTRA_ELLIPSIS: '...',

    CANCEL_SELECTIONS: '取消选择',
    START_POLLING: '开始轮询',
    STOP_POLLING: '停止轮询',

    VALUE_WITH_LABEL: '{_label}: {_value} {_unit}',
    TARGET_AMOUNT: '{_target}数量',
    SELECTED_ROWS: '已选 {_value} 项',
    LAST_UPDATED_AT__TIME: '上次更新时间 {_time}',

    // form
    PLEASE_INSERT__TARGET: '请输入{_target}',
    PLEASE_SELECT__TARGET: '请选择{_target}',
    PLEASE_CONFIG__TARGET: '请配置{_target}',
    PLEASE_ACTIVATE__TARGET: '请开启{_target}',
    PLEASE_UPLOAD__TARGET: '请上传{_target}',
    PLEASE_DRAG_UPLOAD__TARGET: '单击或拖动{_target}文件到此区域进行上传',
    MAX_LENGTH_UP_TO__TARGET: '最长为 {_target} 位',
    WHTHER__TARGET: '是否{_target}',
    STATUS_SUCCESS: '成功',
    THIS_FIELD_IS_REQUIRED: '此项是必填项',
    THIS_FIELD_SHOULD_BE_LARGER_THAN_ZERO: '此项值为数字且大于0',

    OPEN: ECommon.OPEN,
    CLOSE: ECommon.CLOSE,

    NUMBER: ECommon.NUMBER,
    BOOLEAN: ECommon.BOOLEAN,
    ENUM: ECommon.ENUM,
    PHYSICAL_QUANTITY: ECommon.PHYSICAL_QUANTITY,
    OBJECT: ECommon.OBJECT,
    BASIC_UNIT: ECommon.BASIC_UNIT,
    UNIT: ECommon.UNIT,
    CREATE_AT_TOP: '向上方添加',
    CREATE_AT_BOTTOM: '向下方添加',
    CURRENT_EN: '当前节点的EN',

    COPYRIGHT: 'Copyright',
    COPYRIGHT_TEXT: '2022 版权所有',
    COPYRIGHT_LINK: '备123号-1',

    TOTAL: '总共',

    NULLFUNC: '空功能',
};

/**
 * text of names for **modules**
 */
const modules = {
    _TARGET_MANAGE: ECommon.TARGET_MANAGE,
    _TARGET_STORAGE: ECommon.TARGET_STORAGE,
    _TARGET_MAINTAIN: ECommon.TARGET_MAINTAIN,

    COMPONENT: ECommon.COMPONENT,
    MAIN_DATA: ECommon.MAIN_DATA,
    AUTHORITY: ECommon.AUTHORITY,
    SYSTEM: ECommon.SYSTEM,

    PROJECT: ECommon.PROJECT,
    PROJECT_TEMPLATE: ECommon.PROJECT_TEMPLATE,
    FUNCTION_BLOCK: ECommon.FUNCTION_BLOCK,
    FUNCTION_TEMPLATE: ECommon.FUNCTION_TEMPLATE,
    E_PLAN_FILE: ECommon.E_PLAN_FILE,
    CATEGORY: ECommon.CATEGORY,
    PARTS: ECommon.PARTS,
    FUNCTION_CELL: ECommon.FUNCTION_CELL,
    COMMON_PHYSICAL_QUANTITY: ECommon.COMMON_PHYSICAL_QUANTITY,
    COMMON_ENUM_DICT: ECommon.COMMON_ENUM_DICT,
    ENUM_DICT: ECommon.ENUM_DICT,
    ENUM: ECommon.ENUM,
    COMMON_ENUM: `通用${ECommon.ENUM}`,
    ENUM_CONST: `${ECommon.ENUM}常量`,
    SINGLE_VALUE: '单值',
    MULTI_VALUE: '多值',
    COMMON_OBJECT: `通用${ECommon.OBJECT}`,
    CHARACTER: ECommon.CHARACTER,
    FREQUENT_UNIT: ECommon.FREQUENT_UNIT,
    NUMERATOR: ECommon.NUMERATOR,
    DENOMINATOR: ECommon.DENOMINATOR,
    PROXY_PROGRAM: ECommon.PROXY_PROGRAM,

    USER: ECommon.USER,
    ROLE: ECommon.ROLE,
    DEPARTMENT: ECommon.DEPARTMENT,
    MENU: ECommon.MENU,
    STATION: ECommon.STATION,
    TENANT: ECommon.TENANT,

    EDIT: ECommon.EDIT,
    VALUE: ECommon.VALUE,
};

/**
 * text of **enums** in the system
 */
const sysEnums = {
    USER_NAME_AND_PASSWORD: '用户名密码',

    DAILY: '每天',
    WEEKLY: '每周',
    MONTHLY: '每月',
};

const unit = {
    ITEM: '条',
};

const graph = {
    GRAPH_NODE: '节点',
    GRAPH_SUB_NODE: '子节点',
};

/**
 * text of **status** of the target object in the system
 */
const targetStatus = {
    STATUS_IN_USE: ECommon.STATUS_IN_USE,
    STATUS_DELETED: ECommon.STATUS_DELETED,
};

/**
 * text of **actions** of the target object in the system
 */
const targetActions = {
    TABLE_FIRST_PAGE: ECommon.TABLE_FIRST_PAGE,
    TABLE_NEXT: ECommon.TABLE_NEXT,

    ENABLE: ECommon.ENABLE,
    DISABLE: ECommon.DISABLE,

    LAUNCH: ECommon.LAUNCH,
    UNLAUNCH: ECommon.UNLAUNCH,
};

/**
 * text of **error message** from the form reg validate
 */
const regErrorMsg = {
    FORM_ERROR_MESSAGE: '格式错误!',
    ERROR__NAME: `{_name}格式错误!`,

    // user
    PASSWORD_DO_NOT_MATCH: '您输入的两次密码不一致，请重新输入!',
};

export default {
    ...normal,
    ...modules,
    ...sysEnums,
    ...targetStatus,
    ...targetActions,
    ...regErrorMsg,
    ...unit,
    ...graph,
    default: '',
};
